#ifndef MENU_H
#define MENU_H

#include "menu.h"
#include <iostream>
#include <ncurses.h> // TUI
#include <string>
#include <vector>

class Menu {
public:
    Menu(std::string title, 
         int height,
         int width,
         int posY,
         int posX,
         std::vector<std::string> items);

public:
    void drawMenu();
    void drawTitle(WINDOW * win);
    void drawBox();
    void setItems(std::vector<std::string> items);
    void setTitleMode(unsigned int mode);
    void setTitleColors(unsigned int text_color, unsigned int bg_color);
    void setTitlePosition(int y, int x);
    void setPointer(int pointer);
    int getSelectedItem();
    int getPointer();
    void exit();

private:
    void drawItems(WINDOW * win);
public:
    std::string title{};
    std::vector<std::string> items{};
    int height{},
        width{},
        posY{},
        posX{},
        titlePosY{},
        titlePosX{5},
        pointer{},
        key{};

    unsigned int title_mode{A_NORMAL},
                 title_color{COLOR_WHITE},
                 title_bg_color{COLOR_BLACK};

};


#endif